# Maintainer: BlackEagle <ike.devolder@gmail.com>>

pkgname=kodi-addon-visualization-waveform
epoch=1
pkgver=20.2.1
_codename=Nexus
pkgrel=6
pkgdesc="Waveform visualizer for Kodi"
arch=('loong64' 'x86_64')
url='https://github.com/xbmc/visualization.waveform'
license=('GPL')
groups=('kodi-addons' 'kodi-addons-visualization')
makedepends=('cmake' 'glu' 'glm' 'kodi-dev')
options=(!lto)
source=("$pkgname-$pkgver.tar.gz::https://github.com/xbmc/visualization.waveform/archive/$pkgver-$_codename.tar.gz")
sha512sums=('79037df1023842e546336e70858239328fa7d446144e0ca6a8ff82b672d758730c989a8f8e94a66b3cc31f29b2d168b01d373c99ad6ce35c97d36b2ef5b68ac9')

build() {
    cd "visualization.waveform-$pkgver-$_codename"
    cmake \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_SHARED_LIBS=1 \
        -DUSE_LTO=1 \
        .
    make
}

package() {
    depends=('kodi' 'glu' 'glm')
    cd "visualization.waveform-$pkgver-$_codename"
    make DESTDIR="$pkgdir/" install
}

